import React, { useEffect, useState } from 'react';
import {
  Input,
  Button,
  Table,
  Row,
  Col,
  Card,
  Modal,
  message,
  Form,
  Select,
  DatePicker,
  Divider,
  PageHeader,
  Space,
  TreeSelect,
  Badge,
  Avatar,
  Result,
  Spin
} from 'antd';
import { Redirect, connect } from 'umi';
import moment from 'moment';
import './index.less';
import { getAuthority } from '@/utils/authority';
import pagination from '@/utils/pagination';
import { getDictCode, getDictCodeLabel } from '@/utils/DataDictUtils';
import { SmileOutlined, UndoOutlined, PlusOutlined, UserOutlined } from '@ant-design/icons';

const { RangePicker } = DatePicker;
const { confirm } = Modal;
const { Option } = Select;
const dateFormat = 'YYYY-MM-DD';

const SigninPage = (props) => {

  /*props中的变量是connect中接收model变量值的变量,这里的值是由model传过来的 */
  const { location,loading, dispatch, dataSource, classData, total } = props;

  const [visible, setVisible] = useState(false);

  /*存放当前选中记录 */
  useEffect(()=>{
    console.log(location.query);
    dispatch({
        type: 'signinModel/login', 
        payload: { 
          ...location.query },
    });
  },[]);
  return(<>
    <Result
      icon={<SmileOutlined />}
      title="Great, we have done all the operations!"
      extra={<Button type="primary">Next</Button>}
    />
  </>);
}

export default connect(({signinModel }) => ({
  signinModel
}))(SigninPage);